import {
	http
} from "@/util/request/index";

// 收货地址列表
export const deliverList = () => {
	return http.get("/api/deliver/");
};

// 收货地址详情
export const deliverDetail = (id) => {
	return http.get(`/api/deliver/${id}/`);
};

// 添加收货地址
export const addDeliver = (params) => {
	return http.post("/api/deliver/", params);
};

// 修改收货地址
export const editDeliver = (params) => {
	return http.put(`/api/deliver/${params.id}/`, params);
}

// 删除收货地址
export const delDeliver = (id) => {
	return http.delete(`/api/deliver/${id}/`);
}